package com.yungu.swift.report.controller;

import com.yungu.swift.base.ResponseData;
import com.yungu.swift.base.model.admin.AdminReportParam;
import com.yungu.swift.report.entity.ReportOrderSourceDay;
import com.yungu.swift.report.service.OrderSourceDayService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author : cuixiuyin
 * @date : 2019/11/13
 */
@RestController
@Api(value = "【概况】", tags = "订单来源统计")
public class OrderSourceDayCrtl {

    @Autowired
    private OrderSourceDayService orderSourceDayService;

    @PostMapping("/report/orderSourceDay/queryIndex")
    @ApiOperation(value = "首页统计——今日订单", httpMethod = "POST")
    public ResponseData<List<ReportOrderSourceDay>> queryIndex(@RequestBody AdminReportParam reportParam) {
        return orderSourceDayService.queryIndex(reportParam);
    }

}
